#include "hal.h"
#include "sensors.h"


volatile union_sensor sensores;

/**********************************************************************************
 * Descrição:
 *
 * Paramêtro(s):
 *					-
 * Retorno:
 *					-
 **********************************************************************************/
void sensors_init (void){

    GPIO_SetDir(2,SENSORES,0);




}

/**********************************************************************************
 * Descrição:
 *
 * Paramêtro(s):
 *					-
 * Retorno:
 *					-
 **********************************************************************************/
uint16_t sensors_read (uint8_t xSensor){

	return GPIO_ReadValue(PORT_SENSORES);
        //return (LPC_GPIO2->FIOPIN&SENSORES);
}

/**********************************************************************************
 * Descrição:
 *
 * Paramêtro(s):
 *					-
 * Retorno:
 *					-
 **********************************************************************************/
void sensors_isr_read (void){

        sensores.u32 =  GPIO_ReadValue(2);

  }
